#!/usr/bin/env python

import wx
import component

class Names(component.ListCtrl):
    '''Names class
    
    @author Julot <andy.julot@gmail.com>
    @since Saturday, January 14, 2012. 05:06 PM'''
    
    _values = []
    
    def __init__(self, parent):
        style = wx.LC_REPORT | wx.LC_SINGLE_SEL
        component.ListCtrl.__init__(self, parent, style=style)
        self.InsertColumn(1, "Image")
        self.SetColumnWidth(1, wx.LIST_AUTOSIZE)

    def getValues(self):
        return self._values
    
    def setValues(self, values):
        self._values = values
        index = 0
        self.DeleteAllItems()
        for value in values:
            self.InsertStringItem(index, label=value)
            index += 1
    
    values = property(getValues, setValues)
    
